<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>watch</title>
</head>
<body>
<div id="app">
  <input type="text" v-model="val"> <br/>
  {{fullName}}
</div>

</body>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>

  let vm =  new Vue({
    el: '#app',
    watch:{

    },
    computed:{
      fullName(){
        return this.firstName + this.val + this.lastName;
      }
    },
    data:{
      firstName:'leon',
      lastName:'xia',
      val:''
    }

  })


</script>
</html>
